home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / langs / prolog68.zoo / prolog.68 / init.wam next >
Encoding:
Text File  |  1994-06-03  |  6.8 KB  |  331 lines

  1. %     INIT.WAM                Initialization file for WAM emulator
  2. %
  3. %     This file is part of Prolog-68.
  4. %
  5. %     Copyright © 1990 - 1994  Jens Kilian
  6. %
  7. %     This program is free software; you can redistribute it and/or modify
  8. %     it under the terms of the GNU General Public License as published by
  9. %     the Free Software Foundation; either version 1, or (at your option)
  10. %     any later version.
  11. %
  12. %     This program is distributed in the hope that it will be useful,
  13. %     but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. %     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. %     GNU General Public License for more details.
  16. %
  17. %     You should have received a copy of the GNU General Public License
  18. %     along with this program; if not, write to the Free Software
  19. %     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. %
  21. %------------------------------------------------------------------------------
  22. %     This file serves as a script to set up the data structures of the
  23. %     WAM emulator. It is divided into several parts. An empty line
  24. %     terminates each part.
  25. %     Lines beginning with '%' contain comments and are ignored. All
  26. %     other lines must be given in the correct format to be recognized.
  27. %
  28. %---- Part I : names of atoms known to the emulator ---------------------------
  29. %
  30. %     Each line contains the name of an atom, enclosed in apostrophes.
  31. %     A line corresponds to an entry in the STD...[] array.
  32. %
  33. %---- basic atoms
  34. '[]'
  35. '{}'
  36. ','
  37. ';'
  38. 'call'
  39. '-'
  40. 'end_of_file'
  41. %---- entry points
  42. 'shell'
  43. 'failure_error_handler'
  44. 'dynamic_call'
  45. 'debug_dynamic_call'
  46. %---- comparison codes
  47. '<'
  48. '='
  49. '>'
  50. %---- keywords for statistics/2
  51. 'runtime'
  52. 'memory'
  53. 'core'
  54. 'program'
  55. 'heap'
  56. 'global_stack'
  57. 'local_stack'
  58. 'trail'
  59. 'garbage_collection'
  60. %---- used in error handling
  61. 'fail'
  62. %---- names of predefined I/O streams
  63. 'user'
  64. 'user_input'
  65. 'user_output'
  66. 'user_error'
  67. %---- stream opening modes
  68. 'read'
  69. 'write'
  70. 'append'
  71. %---- stream options and properties
  72. 'text'
  73. 'utf'
  74. 'binary'
  75. 'reposition'
  76. 'error'
  77. 'eof_code'
  78. 'reset'
  79. 'input'
  80. 'output'
  81. %---- error ID codes
  82. 'generic_error'
  83. 'type_error'
  84. 'instantiation_error'
  85. 'range_error'
  86. 'existence_error'
  87. 'expression_error'
  88. 'zero_division_error'
  89. 'input_output_error'
  90. 'memory_error'
  91. 'system_error'
  92. %---- names of global flags
  93. 'character_escapes'
  94. 'fileerrors'
  95. 'gc_trace'
  96. 'unknown'
  97. 'error_handling'
  98. '$debugger_mode'
  99. '$debugger_counter'
  100. '$debugger_skip_id'
  101. %---- predicate properties
  102. 'built_in'
  103. 'foreign'
  104. 'compiled'
  105. 'interpreted'
  106. 'dynamic'
  107. 'multifile'
  108. 'exported'
  109.  
  110. %---- Part II : names and arities of functors known to the emulator -----------
  111. %
  112. %     Each line contains the name of an atom (see above) and a decimal
  113. %     number, separated by '/'.
  114. %     A line corresponds to an entry in the STD...[] array.
  115. %
  116. %---- basic functors
  117. '.'/2
  118. '{}'/1
  119. ':-'/2
  120. ','/2
  121. ';'/2
  122. 'call'/1
  123. '-'/2
  124. %---- functor used to mark variables for write/[1,2] and writeq/[1,2]
  125. '$VAR'/1
  126. %---- functors used to construct database references, streams etc.
  127. '$ref'/2
  128. '$stream'/2
  129. '$stream_position'/4
  130. %---- stream options and properties
  131. 'type'/1
  132. 'alias'/1
  133. 'eof_action'/1
  134. 'file_name'/1
  135. 'position'/1
  136. %---- read options
  137. 'vars'/1
  138. 'variable_names'/1
  139. 'singletons'/1
  140. 'void_vars'/1
  141. %---- predicate properties
  142. 'imported_from'/1
  143.  
  144. %---- Part III : names and arities of built-in predicates ---------------------
  145. %
  146. %     Each line corresponds to an entry in the emulator's dispatching table
  147. %     for built-ins. The table index is given before the name of the builtin.
  148. %
  149. %---- system predicates
  150. 0   'halt'/1
  151. 1   'true'
  152. 2   'system'/1
  153. 3   '$CREATE_BLOCK'/2
  154. 4   '$DELETE_BLOCK'
  155. 5   '$LOCK_BLOCK'
  156. 6   '$UNLOCK_BLOCK'
  157. 7   'signal_exception'/1
  158. 8   '$MARK'/1
  159. 9   '$CUT'/1
  160. 10  '$GC'
  161. 11  '$UNKNOWN'
  162. 12  'statistics'
  163. 13  '$STATISTICS'/2
  164. 14  'abort'
  165. 15  '$UNSPY'
  166. 16  '$DYNCALL'
  167. 17  '$SPY'/1
  168. 18  '$NOSPY'/1
  169. 19  '$SPIED'/1
  170. 20  'signal_error'/3
  171. 21  'propagate_error'/4
  172. 22  '$LOCAL_HANDLERS'/2
  173. 23  'set_error_handler'/3
  174. %---- term comparison
  175. 32  '='/2
  176. 33  'compare'/3
  177. 34  '=='/2
  178. 35  '\\=='/2
  179. 36  '@<'/2
  180. 37  '@=<'/2
  181. 38  '@>'/2
  182. 39  '@>='/2
  183. 40  'sort'/2
  184. 41  'keysort'/2
  185. 42  'msort'/2
  186. %---- input & output of terms
  187. 48  'read'/1
  188. 49  'read'/2
  189. 50  'sread'/2
  190. 51  'sread'/3
  191. 52  'write'/1
  192. 53  'write'/2
  193. 54  'writeq'/1
  194. 55  'writeq'/2
  195. 56  'display'/1
  196. 57  'display'/2
  197. 58  'displayq'/1
  198. 59  'displayq'/2
  199. %---- input & output of characters
  200. 60  'get0'/1
  201. 61  'get0'/2
  202. 62  'get'/1
  203. 63  'get'/2
  204. 64  'skip'/1
  205. 65  'skip'/2
  206. 66  'put'/1
  207. 67  'put'/2
  208. 68  'tab'/1
  209. 69  'tab'/2
  210. %---- I/O support
  211. 72  'op'/3
  212. 73  'prompt'/2
  213. 74  'prolog_flag'/3
  214. %---- BIOS access (for demos only)
  215. 75  'biosstat'
  216. 76  'biosget0'/1
  217. 77  'biosput'/1
  218. %---- stream operations
  219. 80  'open'/4
  220. 81  'open_null_stream'/1
  221. 82  '$CLOSE'/1
  222. 83  'flush_output'/1
  223. 84  '$STREAM_PROPERTIES'/2
  224. 85  '$NEXT_STREAM'/2
  225. 86  'set_input'/1
  226. 87  'set_output'/1
  227. 88  'current_input'/1
  228. 89  'current_output'/1
  229. 90  'character_count'/2
  230. 91  'line_count'/2
  231. 92  'line_position'/2
  232. 93  'set_stream_position'/2
  233. 94  '$ABS_FILE_NAME'/3
  234. %---- structure access
  235. 96  '=..'/2
  236. 97  'functor'/3
  237. 98  'arg'/3
  238. 99  'atom_chars'/2
  239. 100 'number_chars'/2
  240. 101 'name'/2
  241. 102 'copy_term'/2
  242. %---- database access
  243. 130 '$FUNCTOR'/3
  244. 131 '$PROCEDURE'/2
  245. 133 '$LOAD_CODE'/3
  246. 135 '$PROC_PROPERTIES'/2
  247. 136 '$NEXT_ATOM'/2
  248. 137 '$CURR_PROC'/1
  249. 138 '$NEXT_PROC'/2
  250. 139 '$NEXT_OP'/5
  251. 140 '$INSTALL_CODE'/2
  252. 141 '$MAKE_STATIC'/1
  253. 142 '$MAKE_DYNAMIC'/1
  254. 148 '$ASSERTA'/3
  255. 149 '$ASSERTZ'/3
  256. 150 '$CLAUSE'/2
  257. 151 '$NEXT_CLAUSE'
  258. 152 'recorda'/3
  259. 153 'recordz'/3
  260. 154 '$RECORDED'/3
  261. 155 '$NEXT_RECORDED'
  262. 156 '$CURRENT_KEYS'/1
  263. 159 'erase'/1
  264. %---- term classification
  265. 160 'var'/1
  266. 161 'nonvar'/1
  267. 164 'composite'/1
  268. 165 'simple'/1
  269. 166 'integer'/1
  270. 167 'atom'/1
  271. 168 'atomic'/1
  272. 169 'nonatomic'/1
  273.  
  274. %---- Part IV : names, types and priorities of standard operators -------------
  275. %
  276. %     Each line contains the name of an atom, a (decimal) priority
  277. %     and an operator type, separated by single spaces.
  278. %
  279. ':-' 1200 xfx
  280. '-->' 1200 xfx
  281. '?-' 1200 fx
  282. ':-' 1200 fx
  283. 'meta_predicate' 1150 fx
  284. 'multifile' 1150 fx
  285. 'mode' 1150 fx
  286. 'public' 1150 fx
  287. 'dynamic' 1150 fx
  288. ';' 1100 xfy
  289. '->' 1050 xfy
  290. ',' 1000 xfy
  291. '\\+' 900 fy
  292. 'spy' 900 fy
  293. 'not' 900 fy
  294. 'nospy' 900 fy
  295. '=' 700 xfx
  296. '\\=' 700 xfx
  297. '==' 700 xfx
  298. '\\==' 700 xfx
  299. '@<' 700 xfx
  300. '@>' 700 xfx
  301. '@=<' 700 xfx
  302. '@>=' 700 xfx
  303. '=..' 700 xfx
  304. 'is' 700 xfx
  305. '=:=' 700 xfx
  306. '=\\=' 700 xfx
  307. '<' 700 xfx
  308. '>' 700 xfx
  309. '=<' 700 xfx
  310. '>=' 700 xfx
  311. ':' 600 xfy
  312. '+' 500 yfx
  313. '-' 500 yfx
  314. '\\/' 500 yfx
  315. '/\\' 500 yfx
  316. 'xor' 500 yfx
  317. '*' 400 yfx
  318. '/' 400 yfx
  319. '//' 400 yfx
  320. 'rem' 400 yfx
  321. 'mod' 400 yfx
  322. '>>' 400 yfx
  323. '<<' 400 yfx
  324. '**' 200 xfx
  325. '^' 200 xfy
  326. '+' 200 fy
  327. '-' 200 fy
  328. '\\' 200 fy
  329.  
  330. %---- END OF FILE -------------------------------------------------------------
  331.